/*
 * MockKeyboardListener.h
 *
 *  Created on: Feb 7, 2012
 *      Author: hzheng
 */

#ifndef MOCKKEYBOARDLISTENER_H_
#define MOCKKEYBOARDLISTENER_H_

#include "EventHandler.h"
#include "KeyboardListener.h"
namespace NS_LCD_AFW
{
class CMockKeyboardListener : public CKeyboardListener
{
public:
	CMockKeyboardListener(){};
	CMockKeyboardListener(CEventHandler *pEventHandler, bool bAutoRelease = true);
	CMockKeyboardListener(CEventHandler *pEventHandler, int eventId,AFW_EventCallBack callBack, bool bAutoRelease = true);
public:
	virtual ~CMockKeyboardListener(){}

	CEventHandler *getEventHandler() const
	{
		return CKeyboardListener::getEventHandler();
	}
	CEventHandler * setEventHandler(CEventHandler *pEventHandler)
	{
		return CKeyboardListener::setEventHandler(pEventHandler);
	}
};
CMockKeyboardListener::CMockKeyboardListener(CEventHandler *pEventHandler, bool bAutoRelease)
//:CKeyboardListener(pEventHandler,bAutoRelease)
{
	this->setEventHandler(pEventHandler);
	this->setAutoReleaae(bAutoRelease);
}
CMockKeyboardListener::CMockKeyboardListener(CEventHandler *pEventHandler, int eventId,AFW_EventCallBack callBack, bool bAutoRelease/* = true*/)
{
	this->setEventHandler(pEventHandler);
	this->setAutoReleaae(bAutoRelease);
	if (NULL != pEventHandler)
	{
		pEventHandler->registerCallBack(eventId,callBack);
	}
}
}


#endif /* MOCKKEYBOARDLISTENER_H_ */
